package com.kaifamiao.mapper;

import com.kaifamiao.model.AdminModel;
import com.kaifamiao.provider.AdminProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;

/**
* @author LENOVO
* @description 针对表【admin】的数据库操作Mapper
* @createDate 2022-07-27 08:56:11
* @Entity com.kaifamiao.model.Admin
*/
public interface AdminMapper {

//    AdminModel selectByPrimaryKey(Long id);
//
//    int updateByPrimaryKeySelective(AdminModel record);


    @Select("select * from admin where id=#{id}")
    AdminModel selectByPrimaryKey(Long id);

    @UpdateProvider(value = AdminProvider.class,method = "updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(AdminModel record);

    @SelectProvider(AdminProvider.class)
    List<AdminModel> selectByAdmin(AdminModel model);

    @SelectProvider(AdminProvider.class)
    AdminModel selectByAdminName(String adminName);
}
